<div style="width: 540px;">
        <form class="form-horizontal" action="<?php echo url_for('account/bindcard')?>" id="formCard" role="form" method="POST">
              <?php if ($sf_user->hasFlash('error')): ?>
                <div class="alert alert-danger"> <?php echo $sf_user->getFlash('error') ?></div>
             <?php endif;?>
            
            <table>
                <input type="hidden" name="BankName" id="BankName">
                <input type="hidden" name="username" id="username" value="<?php echo $uname[0]->getAttrValue(); ?>">
                <tbody><tr>
                    <td class="tit">开户人姓名:</td>
                    <td class="in">
                        <input name="RealName" class="form-control" type="text" maxlength="20" id="RealName">
                    </td>
                </tr>
                <tr>
                    <td class="tit">选择银行:</td>
                    <td class="in">
                        <select name="BankTypeId" id="BankTypeId" class="form-control">
                            <option value="">请选择</option>
                                <?php foreach($bank_list as $k): ?>
                                <option value="<?php echo $k->getId(); ?>"><?php echo $k->getBankName(); ?></option>
                                <?php endforeach;?>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="tit">开户行所在城市:</td>
                    <td class="in">
                        <input name="city" class="form-control" type="text" maxlength="20" id="city">
                        
                    </td>
                </tr>
                <tr>
                    <td class="tit">开户行名称:</td>
                    <td class="in">
                        <input id="BranchName" class="form-control" name="BranchName" value="">
                        <div id="dropBranch"></div>
                        
                    </td>
                </tr>

                    <tr>
                        <td class="tit">银行卡号:</td>
                        <td class="in">
                            <input name="BankNumber" class="form-control" type="text" id="BankNumber" maxlength="23" style="border-width: 1px; color: rgb(0, 0, 0);">
                        </td>
                    </tr>
                    <tr>
                        <td class="tit">确认银行卡号:</td>
                        <td class="in">
                            <input name="ReBankNumber" class="form-control" type="text" maxlength="23" id="ReBankNumber" style="border-width: 1px; color: rgb(0, 0, 0);">
                        </td>
                    </tr>
                <tr>
                    <td class="alt in" colspan="2">此银行卡的开户名必须与身份证认证姓名一致，否则将无法完成提现。</td>
                </tr>
            </tbody></table>
            <button id="cashbanksave" type="submit" class="btn btn-primary cashbankbtn">提交</button>
        </form>
    </div>
<script type="text/javascript">
    $("#BankTypeId").change(function (){
      $("#BankName").val($(this).find("option:selected").text());
    });
    
    
    
</script>

